home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / scimgdataloader_tiff.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-25  |  2.0 KB  |  55 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7. #ifndef SCIMGDATALOADER_TIFF_H
  8. #define SCIMGDATALOADER_TIFF_H
  9.  
  10. #include <tiffio.h>
  11. #include "scimgdataloader.h"
  12. //Added by qt3to4:
  13. #include <QList>
  14.  
  15. class ScImgDataLoader_TIFF : public ScImgDataLoader
  16. {
  17. protected:
  18.  
  19.     enum PSDColorMode
  20.     {
  21.         CM_BITMAP = 0,
  22.         CM_GRAYSCALE = 1,
  23.         CM_INDEXED = 2,
  24.         CM_RGB = 3,
  25.         CM_CMYK = 4,
  26.         CM_MULTICHANNEL = 7,
  27.         CM_DUOTONE = 8,
  28.         CM_LABCOLOR = 9
  29.     };
  30.     void initSupportedFormatList();
  31.     int  getLayers(const QString& fn, int page);
  32.     bool getImageData(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, uint16 photometric, uint16 bitspersample, uint16 samplesperpixel, bool &bilevel, bool &isCMYK);
  33.     bool getImageData_RGBA(TIFF* tif, RawImage *image, uint widtht, uint heightt, uint size, uint16 bitspersample, uint16 samplesperpixel);
  34.     void blendOntoTarget(RawImage *tmp, int layOpa, QString layBlend, bool cmyk, bool useMask);
  35.     QString getLayerString(QDataStream & s);
  36.     bool loadChannel( QDataStream & s, const PSDHeader & header, QList<PSDLayer> &layerInfo, uint layer, int channel, int component, RawImage &tmpImg);
  37.     bool loadLayerChannels( QDataStream & s, const PSDHeader & header, QList<PSDLayer> &layerInfo, uint layer, bool* firstLayer);
  38.  
  39.     bool testAlphaChannelAvailability(const QString& fn, int page, bool& hasAlpha);
  40.     void unmultiplyRGBA(RawImage *image);
  41.  
  42.     int    random_table[4096];
  43.     uint16 photometric, samplesperpixel;
  44.  
  45. public:
  46.     ScImgDataLoader_TIFF(void);
  47.  
  48. //    virtual void preloadAlphaChannel(const QString& fn, int res);
  49.     virtual bool preloadAlphaChannel(const QString& fn, int page, int res, bool& hasAlpha);
  50.     virtual void loadEmbeddedProfile(const QString& fn, int page = 0);
  51.     virtual bool loadPicture(const QString& fn, int page, int res, bool thumbnail);
  52. };
  53.  
  54. #endif
  55.